package UIFree.graphicTools.color
{
	import UIFree.graphicTools.color.palettes.uif_basePaletteView;
	import UIFree.graphicTools.color.palettes.uif_gradientPaletteView;
	import UIFree.graphicTools.color.palettes.uif_spectrumPaletteView;
	import UIFree.uif_component;
	import UIFree.uif_ecomponent;
	
	import flash.events.Event;
	import flash.geom.Point;
	import flash.geom.Rectangle;
	
	public class uif_gradientPalette extends uif_frameColorCtrl {
		public function uif_gradientPalette(parent:uif_component, ax:int=0, ay:int=0, awidth:int=0, aheight:int=0, styleClass:Object='') {
			super(parent, ax, ay, awidth, aheight, styleClass);
		}
		
		override protected function createPalette(rect:Rectangle): uif_basePaletteView {
			return new uif_gradientPaletteView(this, rect.x, rect.y, rect.width, rect.height, style.palette);
		}
		
		public function get baseColor(): uint {
			return (palette as uif_gradientPaletteView).baseColor;
		}
		
		public function set baseColor(a_color: uint): void {
			(palette as uif_gradientPaletteView).baseColor = a_color;
			setFramePos(palette.width - frameSize.x, 0);
		}
	}
}